import request from "@/utils/request";

// 查询协议列表
export function listAgreement(query) {
  return request({
    url: "/system/agreement/list",
    method: "get",
    params: query
  });
}

// 查询协议详细
export function getAgreement(id) {
  return request({
    url: "/system/agreement/" + id,
    method: "get"
  });
}

// 新增协议
export function addAgreement(data) {
  return request({
    url: "/system/agreement",
    method: "post",
    data: data
  });
}

// 修改协议
export function updateAgreement(data) {
  return request({
    url: "/system/agreement",
    method: "put",
    data: data
  });
}

// 删除协议
export function delAgreement(id) {
  return request({
    url: "/system/agreement/" + id,
    method: "delete"
  });
}

// 导出协议
export function exportAgreement(query) {
  return request({
    url: "/system/agreement/export",
    method: "get",
    params: query
  });
}

// 查询pc用户服务协议
export function getUserServiceAgreement() {
  return request({
    url: "/system/agreement/getUserServiceAgreement",
    method: "get"
  });
}
// 查询pc隐私政策
export function getPrivacyPolicy() {
  return request({
    url: "/system/agreement/getPrivacyPolicy",
    method: "get"
  });
}
//查询 pc 法律声明
export function getLegalNotice() {
  return request({
    url: "/system/agreement/getLegalNotice",
    method: "get"
  });
}
